function qq(tag) {
  return document.getElementsByTagName(tag);
}

function loadScript(url) {
  var e = document.createElement("script");
  e.src = url;
  e.type = "text/ecmascript";
  qq("head")[0].appendChild(e);
  return true;
}

function loadScriptOnce(url) {
  var a = qq('script');
  var rooted = location.protocol + '//' + location.host + url;
  for (var i=0; i < a.length; i++) {
    if (a[i].src == url || a[i].src == rooted) {
      return false;
    }
  }
  return loadScript(url);
}
